<?php
/**
 *
 * PHP 5
 *
 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
 * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
 *
 * Licensed under The MIT License
 * Redistributions of files must retain the above copyright notice.
 *
 * @copyright     Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
 * @link          http://cakephp.org CakePHP(tm) Project
 * @package       Cake.View.Layouts
 * @since         CakePHP(tm) v 0.10.0.1076
 * @license       MIT License (http://www.opensource.org/licenses/mit-license.php)
 */

$cakeDescription = __d('cake_dev', 'SIDEP: Sistema de Depreciação');
?>
<!DOCTYPE html>
<html lang="en">
<head>
	<?php echo $this->Html->charset(); ?>
	<title>
		<?php echo $cakeDescription ?>:
		<?php echo $title_for_layout; ?>
	</title>
	<?php
		echo $this->Html->meta("viewport", "width=device-width, initial-scale=1.0");
		echo $this->Html->meta("description", "Sistema de Depreciação de Bens Materiais");
		echo $this->Html->meta("author", "Diovane Monteiro, Renan Reis, Kathlen Brum");
		echo $this->Html->meta('icon');

		echo $this->Html->css('bootstrap');
		echo $this->Html->css('bootstrap-responsive');
		echo $this->Html->css('font-awesome/font-awesome');
		echo $this->Html->css('bootstrap-custom');
		echo $this->Html->css('bootstrap-responsive-custom');
		echo $this->Html->css('smoothness/jquery-ui');
		echo $this->Html->css('sidep');
		//echo $this->Html->css('style');
				
		echo $this->Html->script('jquery-1.7.2');
		echo $this->Html->script('jquery-ui');
				
		echo $this->fetch('meta');
		echo $this->fetch('css');
		echo $this->fetch('script');
	?>
	
	<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
	<!--[if lt IE 9]>
	<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
	<![endif]-->
	
</head>
<body>
	  
  <div class="navbar navbar-inverse navbar-fixed-top">
      <div class="navbar-inner">
      <div class="container-fluid">
      	  <a class="sprite-brand" href="#"><?php echo $this->Html->image('logo-ufam.png', array('height' => 37, 'width' => 37));?></a>
          <a class="brand" href="#">SIDEP</a>
          	<div class="btn-group pull-right">
				<a class="btn btn-primary" data-toggle="dropdown" href="#"><i class="icon-user icon-white"></i>&nbsp;
					<?php 
					if($this->Session->read('Auth.User.User.nome'))
						echo $this->Session->read('Auth.User.User.nome');
					else
						echo $this->Session->read('Auth.User.User.login')?>
				</a>
				<button class="btn btn-primary dropdown-toggle" data-toggle="dropdown">
            		<span class="caret"></span>
            	</button>
	            <ul class="dropdown-menu">
			  		<li>
			  			<?php echo $this->Html->link('Perfil', array('controller' => 'users', 'action' => 'view', $this->Session->read('Auth.User.User.id')));?>
			  		</li>
	            	<li class="divider"></li>
	              	<li><?php echo $this->Html->link('Logout', array('controller' => 'users', 'action' => 'logout'));?></li>
	            </ul>
          	</div>
          <div class="nav-collapse">
            <ul class="nav">
              	<li class="dropdown">
              		<a href="#" class="dropdown-toggle" data-toggle="dropdown">Cadastros <b class="caret"></b></a>
					<ul class="dropdown-menu">
						<li><?php echo $this->Html->link('Contas Contábeis', array('controller' => 'contaContabils', 'action' => 'index'));?></li>
		          		<li class=""><?php echo $this->Html->link('Produtos', array('controller' => 'produtos', 'action' => 'index'));?></li>
		          		<li class=""><?php echo $this->Html->link('Unidades', array('controller' => 'unidades', 'action' => 'index'));?></li>
		          		<li class=""><?php echo $this->Html->link('Fornecedores', array('controller' => 'fornecedors', 'action' => 'index'));?></li>
		          		<li class="divider"></li>
		          		<li class=""><?php echo $this->Html->link('Bens Patrimoniais', array('controller' => 'bem_patrimonials', 'action' => 'index'));?></li>
					</ul>
		  		</li>
              	<li class="dropdown">
              		<a href="#" class="dropdown-toggle" data-toggle="dropdown">Movimentações <b class="caret"></b></a>
					<ul class="dropdown-menu">
						<li class=""><?php echo $this->Html->link('Inventário', array('controller' => 'inventarios', 'action' => 'index'));?></li>
	          			<li class=""><?php echo $this->Html->link('Reavaliação', array('controller' => 'reavaliacaos', 'action' => 'index'));?></li>
			          	<li class=""><?php echo $this->Html->link('Depreciação', array('controller' => 'depreciacaos', 'action' => 'add'));?></li>
					</ul>
				</li>
				<li class="dropdown">
					<a href="#" class="dropdown-toggle" data-toggle="dropdown">Relatórios <b class="caret"></b></a>
					<ul class="dropdown-menu">
		              	<li class=""><?php echo $this->Html->link('Resumo Financeiro', array('controller' => 'relatorios', 'action' => 'resumo_financeiro'));?></li>
			          	<li class=""><?php echo $this->Html->link('Analítico de Depreciação', array('controller' => 'relatorios', 'action' => 'analitico_depreciacao'));?></li>
			           <li class=""><?php echo $this->Html->link('Bens por Unidade', array('controller' => 'relatorios', 'action' => 'bens_unidades'));?></li> 
             	  		<li class=""><?php echo $this->Html->link('Bens por Conta', array('controller' => 'relatorios', 'action' => 'bens_conta'));?></li> 
            			  <li class=""><?php echo $this->Html->link('Bens Baixados', array('controller' => 'relatorios', 'action' => 'bens_baixados'));?></li> 
             	 		 <li class=""><?php echo $this->Html->link('Bens Inventariados', array('controller' => 'relatorios', 'action' => 'bens_inventariados'));?></li> 
            			
            		 </ul>
				</li>
				<li><?php echo $this->Html->link('Importação', array('controller' => 'importacao', 'action' => 'index')); ?></li>	      
            </ul>
          </div>
        </div>
      </div>
    </div>
    
    <header class="jumbotron subhead">
	  <div class="container-fluid">
	    <h2><?php echo $this->Html->image('logo-ufam.png', array('height' => 60, 'width' => 60));?> SIDEP - Sistema de Depreciação de Bens Patrimoniais</h2>
	    <!-- <p class="lead">Dozens of reusable components built to provide navigation, alerts, popovers, and more.</p> -->
	  </div>
	</header>
    
    <div class="container-fluid">
      <div class="row-fluid">
      
		<div class="span2">
          <div class="well sidebar-nav">
            <ul class="nav nav-list">
              <li class="nav-header"><i class="icon-home"></i> Administração</li>
	          	<li class=""><?php echo $this->Html->link('Contas Contábeis', array('controller' => 'contaContabils', 'action' => 'index'));?></li>
	          	<li class=""><?php echo $this->Html->link('Grupos', array('controller' => 'grupos', 'action' => 'index'));?></li>
			    <li class=""><?php echo $this->Html->link('Produtos', array('controller' => 'produtos', 'action' => 'index'));?></li>
			    <li class=""><?php echo $this->Html->link('Unidades', array('controller' => 'unidades', 'action' => 'index'));?></li>
			    <li class=""><?php echo $this->Html->link('Fornecedores', array('controller' => 'fornecedors', 'action' => 'index'));?></li>
			    <li class=""><?php echo $this->Html->link('Bens Patrimoniais', array('controller' => 'bem_patrimonials', 'action' => 'index'));?></li>
			    <?php 
			    if($this->Session->read('Auth.User.User.admin') == 1):?>
			    	<li class=""><?php echo $this->Html->link('Usuários', array('controller' => 'users', 'action' => 'index'));?></li>
			    <?php endif;?>
              <li class="nav-header"><i class="icon-wrench"></i> Movimentação</li>
              	<li class=""><?php echo $this->Html->link('Inventário', array('controller' => 'inventarios', 'action' => 'index'));?></li>
	          	<li class=""><?php echo $this->Html->link('Reavaliação', array('controller' => 'reavaliacaos', 'action' => 'index'));?></li>
	          	<li class=""><?php echo $this->Html->link('Depreciação', array('controller' => 'depreciacaos', 'action' => 'add'));?></li>
              <li class="nav-header"><i class="icon-signal"></i> Relatórios</li>
              	<li class=""><?php echo $this->Html->link('Resumo Financeiro', array('controller' => 'relatorios', 'action' => 'resumo_financeiro'));?></li>
	          	<li class=""><?php echo $this->Html->link('Analítico de Deprec.', array('controller' => 'relatorios', 'action' => 'analitico_depreciacao'));?></li>
	          	 <li class=""><?php echo $this->Html->link('Bens por Unidade', array('controller' => 'relatorios', 'action' => 'bens_unidades'));?></li> 
             	  <li class=""><?php echo $this->Html->link('Bens por Conta', array('controller' => 'relatorios', 'action' => 'bens_conta'));?></li> 
               <li class=""><?php echo $this->Html->link('Bens Baixados', array('controller' => 'relatorios', 'action' => 'bens_baixados'));?></li> 
             	  <li class=""><?php echo $this->Html->link('Bens Inventariados', array('controller' => 'relatorios', 'action' => 'bens_inventariados'));?></li> 
              
              <li class="nav-header"><i class="icon-user"></i> Perfil</li>
              	<li><a href="my-profile.html">Meus dados</a></li>
			  	<li><?php echo $this->Html->link('Sair', array('controller' => 'users', 'action' => 'logout'));?></li>
            </ul>
          </div>
		</div>
      
      	<div class="span10">
			<?php echo $this->Session->flash('flash', array('element' => 'messageInfo')); ?>
			<?php echo $this->fetch('content'); ?>
		</div>
		
      </div><!--/row-->
      
      <hr/>
      <footer><p>&copy; ICOMP - Instituto de Computação 2012</p></footer>
      
    </div><!--/.fluid-container-->
    
    <div id="ajax-indicator" class="hidden">
    	Processando...			
    </div>
    
    <?php echo $this->Html->script('bootstrap');  ?> 
	<?php echo $this->Js->writeBuffer();?>
	
	<?php echo $this->element('sql_dump'); ?>
</body>
</html>
